<div class="da-panel">
	<div class="da-panel-header">
		<span class="da-panel-title">
			<i class="icon-circle-plus"></i> Tambah Pegawai
		</span>
	</div>
	<div class="da-panel-content da-form-container">
	<form id="da-dialog-add-val" class="da-form" method="post" action="modul/pegawai/pegawai.proses.php">
		<div id="da-validate-error" class="da-message error" style="display:none;"></div>
		<table class="da-table da-detail-view no-border">
			<tbody>
				<tr>
					<th>NIP</th>
					<td><input type="text" placeholder="NIP" name="nip"/></td>
				</tr>
				<tr>
					<th>Nama Lengkap</th>
					<td><input type="text" placeholder="Nama Lengkap" name="nama"/></td>
				</tr>
				<tr>
					<th>Jabatan</th>
					<td>
						<select name="jabatan">
						<?php 
							$q = mysql_query("SELECT * FROM r_jabatan");
							while($dt = mysql_fetch_array($q)) {
								if($dt['kd_jabatan'] < 6) {
									if(mysql_num_rows(mysql_query("
									SELECT * FROM t_pegawai WHERE kd_jabatan=".$dt['kd_jabatan']))==1) {
										continue;
									}
								}
						?>
						<option value="<?php  echo $dt['kd_jabatan'] ?>"><?php echo $dt['nm_jabatan'] ?></option>
						<?php } ?>
					</select>
					<a href="?tambahjabatan" rel="tooltip" data-placement="top" class="btn" title="Tambah Jabatan"><i class="icon-circle-plus"></i></a>
					</td>
				</tr>
				<tr>
					<th>Pangkat</th>
					<td>
						<select name="pangkat">
						<option value="0"></option>
						<?php 
							$q = mysql_query("SELECT kd_pangkat, nm_pangkat FROM r_pangkat WHERE jns_pangkat='jaksa'");
							while($dt = mysql_fetch_array($q)) {
						?>
						<option value="<?php  echo $dt['kd_pangkat'] ?>"><?php echo $dt['nm_pangkat'] ?></option>
						<?php } ?>
					</select>
					<a href="?tambahpangkat" rel="tooltip" data-placement="top" class="btn" title="Tambah Pangkat"><i class="icon-circle-plus"></i></a>
					</td>
				</tr>
				<tr>
					<th valign="top">Alamat</th>
					<td><textarea name="alamat"></textarea></td>
				</tr>
				<tr>
					<th>No. Telepon</th>
					<td><input type="text" placeholder="Telepon" name="telepon"/></td>
				</tr>
				<tr>
					<th>Handphone</th>
					<td><input type="text" placeholder="Handphone" name="handphone"/></td>
				</tr>
			</tbody>
		</table>
		<fieldset class="da-form-inline">
			<legend>Akun</legend>
		</fieldset>
		<table class="da-table da-detail-view no-border">
			<tbody>
				<tr>
					<th>Nama Pengguna</th>
					<td><input type="text" placeholder="Nama Pengguna" name="username"/></td>
				</tr>
				<tr>
					<th>Jenis Pengguna</th>
					<td>
						<select name="jns_pengguna">
							<option value="admin">Administrator</option>
							<option value="kasipidum">Kasi Pidana Umum</option>
							<option value="kasi">Kepala Seksi</option>
							<option value="jaksa">Jaksa</option>
							<option value="sekretariat">Sekretariat</option>
							<option value="pratut">Pra Penuntutan</option>
							<option value="penuntutan">Penuntutan</option>
							<option value="barangbukti">Barang Bukti</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>Kata Sandi</th>
					<td><input type="password" placeholder="Kata Sandi" name="password"/></td>
				</tr>
				<tr>
					<th>Ulangi Kata Sandi</th>
					<td><input type="password" placeholder="Ulangi Kata Sandi" name="password2"/></td>
				</tr>
			</tbody>
		</table>
		<div class="btn-row">
			<a href="pegawai.php" class="btn"><i class="icol-cross"></i> Batal</a>
			<button class="btn"><i class="icol-disk"></i> Simpan</button>
			<input type="hidden" name="pegawai" value="tambah" />
		</div>
	</form>	
	</div>
</div>
